<?php
/**
 * debug component
 * @package kernel_component_sys
 */
load_lib('/sys/component');
/**
 * debug component
 * @author pandajingjing
 * @package kernel_component_sys
 */
class sys_debugcomponent extends sys_component{
	
	/**
	 * 获取UI
	 */
	function getView(){
		$arrDebugInfo=$this->_arrPrivate['DEBUGGER']->getDebugInfo();
		foreach($arrDebugInfo as $strDebugType =>$arrDebugInfoDetail){
			$arrDebugInfo[$strDebugType]['TIMECOST']=$arrDebugInfoDetail['ENDTIME']-$arrDebugInfoDetail['STARTTIME'];
			$arrDebugInfo[$strDebugType]['MEMORYCOST']=$arrDebugInfoDetail['ENDMEMORY']-$arrDebugInfoDetail['STARTMEMORY'];
		}
		$this->setData('arrDebugMsg',$this->_arrPrivate['DEBUGGER']->getMsgs());
		$this->setData('arrDebugInfo',$arrDebugInfo);
		$this->setData('arrDebugParam',$this->_arrPrivate['DEBUGGER']->getParams());
		return 'debug';
	}
}